<template>
  <div class="bk-divider" :class="'txt-' + align"><slot></slot></div>
</template>

<script>
export default {
  props: {
    align: {
      type: String,
      default: "center",
    },
  },
};
</script>

<style scoped>
/* 
  浏览器前缀
  -webkit-: chrome
  -ms-    : ie
  -moz-   : firefox
  -o-     : opera 欧鹏（新版本已经基于 webkit）
*/
.bk-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #969799;
  font-size: 14px;
  line-height: 24px;
  border-color: #ebedf0;
  border-style: solid;
  border-width: 0;
}

.bk-divider::before,
.bk-divider::after {
  display: block;
  flex: 1;
  box-sizing: border-box;
  height: 1px;
  border-color: inherit;
  border-style: inherit;
  border-width: 1px 0 0;
  /* transform: scaleY(0.5); */
}

.bk-divider::before {
  content: "";
  margin-right: 16px;
}

.bk-divider.txt-left::before,
.bk-divider.txt-right::after {
  max-width: 10%;
}

.bk-divider::after {
  content: "";
  margin-left: 16px;
}
</style>